package hhm.android.library.weightHeightPicker.weightPicker;

import androidx.annotation.NonNull;

import java.util.ArrayList;

public class LIANGAdapter extends BaseWeightAdapter {

    public LIANGAdapter(@NonNull WeightParams dateParams, @NonNull WeightPick datePick, int selectColor) {
        super(dateParams, datePick, selectColor);
    }

    @Override
    public String getItem(int position) {
        int number = mData.get(position);
        if (number < 10) {
            return "0" + number;
        } else {
            return "" + number;
        }
    }

    @Override
    public int getCurrentIndex() {
        return mData.indexOf(mDatePick.mg);
    }

    @Override
    public void refreshValues() {
        ArrayList<Integer> values = new ArrayList<>();
        for (int i = 0; i < 100; i++) {
            values.add(i);
        }
        setData(values);
    }
}

